﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Microsoft.Practices.ServiceLocation;
using TimeTravel.Components;
using TimeTravel.IServices;

namespace TimeTravel.Controllers
{
    public partial class PartialViewController : BaseController
    {
        static readonly IProductService ProductService = ServiceLocator.Current.GetInstance<IProductService>();
        /// <summary>
        /// 产品列表
        /// </summary>
        /// <returns></returns>
        public PartialViewResult Product()
        {
            var productList = new List<ProductInfo>(); //ProductService.GetAll();
            return PartialView(SubPagePath + "_Product.cshtml", productList);
        }

        /// <summary>
        /// 产品详细信息
        /// </summary>
        /// <param name="pid"></param>
        /// <returns></returns>
        public PartialViewResult ProductDetail(int pid = 0)
        {
            ViewData["pid"] = pid;
            return PartialView(SubPagePath + "_ProductDetail.cshtml");
        }
        /// <summary>
        /// 产品添加
        /// </summary>
        /// <returns></returns>
        public ActionResult AddProduct()
        {
            return null;
        }
        /// <summary>
        /// 产品更新
        /// </summary>
        /// <returns></returns>
        public ActionResult UpdateProduct()
        {
            return null;
        }
        /// <summary>
        /// 产品删除
        /// </summary>
        /// <returns></returns>
        public ActionResult DeleteProduct()
        {
            return null;
        }
    }
}
